<extend name="public@base5"/>
<block name="main">
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="nav-item">
                <a class="nav-link active" href="{:url('Task/index')}">任务列表</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{:url('Task/add')}">添加任务</a>
            </li>

        </ul>
       
        <table class="table table-hover table-bordered margin-top-20">
            <thead>
            <tr>
                <th width="50">ID</th>
                <th>任务名称</th>
                <th>任务类型</th>                
                <th>任务目标</th>
                <th>任务奖励</th>
                <th>任务描述</th>
                <th width="120">{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            
            <foreach name="items" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>
                        {$vo.task_name}
                    </td>
                    
                    <td>
                        {$vo.name}
                    </td>
                    <td>{$vo.task_req}</td>                 
                    <td>{$vo.task_reward}</td> 
                    <td>{$vo.task_desc}</td> 

                    <td>
                        <a class="btn btn-xs btn-primary" href='{:url("task/add",["id"=>$vo["id"]])}'
                           title="{:lang('EDIT')}" data-toggle="tooltip">
                            <i class="fa fa-edit fa-fw"></i>
                        </a>
                        <a class="btn btn-xs btn-danger js-ajax-delete"
                           href="javascript:"
                           data-href="admin/task/del/id/{$vo.id}" title="{:lang('DELETE')}" data-toggle="tooltip">
                            <i class="fa fa-trash fa-fw"></i>
                        </a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </div>
</block>
